import unittest
from hlmcsv import*
class MyTestCase(unittest.TestCase):
    def setUp(self):
        pass
    def test_something(self):
        name_list = ['熙凤', '黛玉', '宝钗', '探春', '湘云', '迎春', '元春', '惜春', '妙玉', '巧姐', '李纨', '可卿']
        txt_path = 'D:\hlm.txt'
        name_list_count = [1149, 953, 696, 448, 393, 146, 126, 105, 81, 40, 36, 14]
        items = list()
        for i in range(12):
            items.append([name_list[i], name_list_count[i]])
        self.assertEqual(items, NameCount().getNameTimesSort(name_list,txt_path))
    def tearDown(self):
        pass
if __name__ == '__main__':
    unittest.main()
